home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / Dev / Amiga-E / E_v3.2a / Src / Reqs / ReqToolsDemo.e < prev   
Text File  |  1992-09-02  |  1KB  |  36 lines

  1. /* Yet another demo to use other librarys from E.
  2.    Now we do some requesters from the reqtools.library.   */
  3.  
  4. MODULE 'ReqTools'
  5.  
  6. CONST FILEREQ=0,REQINFO=1
  7.  
  8. DEF colour,num=10,buf[120]:STRING,req
  9.  
  10. PROC main()
  11.   IF reqtoolsbase:=OpenLibrary('reqtools.library',37)
  12.     RtEZRequestA('Lets test that handy ReqTools library, shall we ?',
  13.       'Why?|Not again!|Yes! lets see that!',0,0,0)
  14.     IF (colour:=RtPaletteRequestA('Pick your colour:',0,0))=-1
  15.       RtEZRequestA('Hard to choose eh?','Damn right.',0,0,0)     /* colreq */
  16.     ELSE
  17.       RtEZRequestA('Did you really like colour \d ?','Nope|Zure!',0,[colour],0)
  18.     ENDIF
  19.     RtEZRequestA('Now for some input ...','What?',0,0,0)
  20.     RtGetLongA({num},'Enter a number:',0,0)                      /* longreq */
  21.     StrCopy(buf,'bla',ALL)
  22.     RtGetStringA(buf,100,'Enter something:',0,0)                 /* stringreq */
  23.     RtEZRequestA('Lets have that nice filerequester ...',
  24.       'More!more!|Boring!',0,0,0)
  25.     IF req:=RtAllocRequestA(FILEREQ,0)
  26.       buf[0]:=0
  27.       RtFileRequestA(req,buf,'Pick your file:',0)
  28.       RtFreeRequest(req)
  29.     ENDIF
  30.     RtEZRequestA('That\as it.','Phew.',0,0,0)
  31.     CloseLibrary(reqtoolsbase)
  32.   ELSE
  33.     WriteF('Could not open reqtools.library!\n')
  34.   ENDIF
  35. ENDPROC
  36.